#define _CRT_SECURE_NO_WARNINGS  1
#include"Sort.h"
#include"StackQueue.h"


void TestInsertSort()
{
	int arr[] = { 1,12,434,3,5,4,2,5454,6,45,3 };
	InsertSort(arr, sizeof(arr) / sizeof(int));
	ArrPrint(arr,sizeof(arr)/sizeof(int));
}

void TestShellSort()
{
	int arr[] = { 1,12,434,3,5,4,2,5454,6,45,3 };
	ShellSort(arr, sizeof(arr) / sizeof(int));
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestSelectSort()
{
	int arr[] = { 1,12,434,3,5,4,2,5454,6,45,3 };
	SelectSort(arr, sizeof(arr) / sizeof(int));
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestHeapSort()
{
	int arr[] = { 1,12,434,3,5,4,2,5454,6,45,3 };
	HeapSort(arr,sizeof(arr) / sizeof(int));
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestBubbleSort()
{
	int arr[] = { 100,1,12,434,3,5,4,2,5454,6,45,3 };
	BubbleSort(arr, sizeof(arr) / sizeof(int));
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestQuickSort()
{
	int arr[] = { 100,1,12,4,34,3,5,4,2,5454,6,45,3 };
	QuickSort(arr, 0 , sizeof(arr) / sizeof(int) - 1);
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestQuickSortNonR()
{
	int arr[] = { 10,0,1,12,4,34,3,5,4,2,5454,6,4,5,3 };
	QuickSortNonR(arr, 0, sizeof(arr) / sizeof(int) - 1);
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestMergeSort()
{
	int arr[] = { 10,0,1,12,4,34,3,5,4,2,5454,6,4,5,3 };
	MergeSort(arr, 0, sizeof(arr) / sizeof(int) - 1);
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestMergeSortNonR()
{
	int arr[] = { 10,0,1,12,4,34,3,5,4,2,5454,6,4,5,3 };
	MergeSortNonR(arr, 0, sizeof(arr) / sizeof(int) - 1);
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

void TestCountSort()
{
	int arr[] = { 10,0,1,12,4,34,3,5,4,2,5454,6,4,5,3 };
	CountSort(arr ,sizeof(arr) / sizeof(int));
	ArrPrint(arr, sizeof(arr) / sizeof(int));
}

int main()
{
	TestInsertSort();
	TestShellSort();
	TestSelectSort();
	TestHeapSort();
	TestBubbleSort();
	TestQuickSort();
	TestQuickSortNonR();
	TestMergeSort();
	TestMergeSortNonR();
	TestCountSort();
	return 0;
}